<?php

namespace App\Services\DelayQueue;

use App\Services\BaseServices;
use Illuminate\Support\Facades\Redis;

class DelayQueueServices extends BaseServices
{
    public function redisZadd($add)
    {
        Redis::lpush("delay_queue_123",$add);
    }

    public function redisBlpop()
    {
        $len = Redis::llen("delay_queue_123");
        if($len < 1){
            return false;
        }
        $data = Redis::brpop("delay_queue_123",10);
        return $data;
    }
}
